home *** CD-ROM | disk | FTP | other *** search
- --- w:SCOptions Sun Nov 13 18:21:45 1994
- +++ SCOptions Sat Nov 05 21:51:46 1994
- @@ -0,0 +1,35 @@
- +Ansi
- +Batch
- +NoDebug
- +Error=All
- +ErrorRexx
- +Ignore=306
- +IncludeDir=A31:
- +LinkOpts=NoAlvs
- +LinkOpts=NoDebug
- +MemSize=Huge
- +MultiCharacterConstants
- +NoIcons
- +NoMultipleIncludes
- +NoStackCheck
- +OnError=Continue
- +Optimize
- +OptimizerComplexity=10
- +OptimizerDepth=10
- +OptimizerInlineLocal
- +OptimizerRecurDepth=10
- +NoOptimizerScheduler
- +OptimizerTime
- +Parameters=Registers
- +SmallCode
- +SmallData
- +Startup=cres
- +Strict
- +StringMerge
- +Verbose
- +Define=__ANSI__
- +Define=USE_BUILTIN_MATH
- +Define=AMIGA
- +Define=STDC_HEADERS
- +Define=KULTUR
- +Ignore=187
- --- w:SMakefile Sun Nov 13 18:21:42 1994
- +++ SMakefile Sun Nov 13 18:17:19 1994
- @@ -0,0 +1,35 @@
- +all: metre
- +
- +OBJS= lex_yy.o rules.o ytab.o
- +
- +metre: $(OBJS)
- + sc link pname $@ $(OBJS)
- +
- +ytab.h: gram.y
- + byacc -d $<
- + rename y.tab.h ytab.h
- + rename y.tab.c ytab.c
- +
- +lex_yy.c: scan.l
- + flex $<
- + rename lex.yy.c lex_yy.c
- +
- +lex_yy.o: lex_yy.c ytab.h metreint.h metre.h
- + sc objname $@ $<
- +
- +rules.o: rules.c metre.h
- + sc objname $@ $<
- +
- +ytab.o: ytab.c ytab.h metreint.h metre.h
- + sc objname $@ $<
- +
- +ytab.c: ytab.h
- +
- +clean:
- + delete ytab.h ytab.c lex_yy.c *.o metre.lnk
- +
- +realclean: clean
- + delete metre
- +
- +dist:
- + LhA -H2 -IaAdemrxZ2 -b64 -P-1 -v0 -Qh64 a Ram:metre \#?
- --- w:gram.y Wed Sep 07 19:10:00 1994
- +++ gram.y Sat Nov 05 21:39:12 1994
- @@ -710,6 +710,8 @@
- **************************************************************/
-
- #include <stdio.h>
- +#include <stdlib.h>
- +#include <ctype.h>
- #include <limits.h>
- #include <stdarg.h>
- #include "metreint.h"
- @@ -867,6 +869,10 @@
- static void int_fatal(int, char *, ...);
- static void int_warn(int, char *, ...);
-
- +#ifdef KULTUR
- +extern int yyparse (void);
- +extern int yylex (void);
- +#endif
-
- /* Functions. */
-
- --- w:metre.h Wed Sep 07 19:10:54 1994
- +++ metre.h Sat Nov 05 21:37:22 1994
- @@ -193,4 +193,6 @@
- extern void fatal(int, char *, ...);
- extern void warn(int, char *, ...);
-
- +extern void rules (void);
- +
- #endif
- --- w:scan.l Wed Sep 07 19:36:38 1994
- +++ scan.l Sat Nov 05 21:22:54 1994
- @@ -34,6 +34,9 @@
- and pclex. Note: Berkeley is considered same as AT&T lex, and Posix is not
- considered at all.
- */
- +#ifdef FLEX_SCANNER
- +#define MTR_FLEX
- +#else
- #ifdef YY_INIT
- #ifdef YY_INPUT
- #define MTR_PCLEX
- @@ -47,6 +50,7 @@
- #define MTR_ATTLEX
- #endif
- #endif
- +#endif
-
- /*
- Redefine size of miniscule yytext[]. Should have no affect on other lex's.
- @@ -192,6 +196,8 @@
- static void yy_init(void);
- #endif
-
- +extern void rules (void);
- +
- /* Static variables. */
-
- #if READ_LINE
- @@ -299,11 +305,8 @@
- accounting and return token to parser.
- */
- count(); return(TK_CONSTANT); }
- -0[xX]{H}+{IS}? { count(); return(TK_CONSTANT); }
- -0{D}+{IS}? { count(); return(TK_CONSTANT); }
- 0{D}+{IS}? { count(); return(TK_CONSTANT); }
- {D}+{IS}? { count(); return(TK_CONSTANT); }
- -{D}+{IS}? { count(); return(TK_CONSTANT); }
- '(\\.|[^\\'])+' { count(); return(TK_CONSTANT); }
- {D}+{E}{FS}? { count(); return(TK_CONSTANT); }
- {D}*"."{D}+({E})?{FS}? { count(); return(TK_CONSTANT); }
- @@ -397,7 +400,7 @@
- identifier, substitute replacement string for this lexeme.
- */
- if (repl_str != NULL && strncmp(&cmd_line_argv[i][2], id,
- - repl_str - &cmd_line_argv[i][2]) == 0)
- + (size_t) (repl_str - &cmd_line_argv[i][2])) == 0)
- {
- unsigned len;
- char *p;
- @@ -531,8 +534,6 @@
- /* Read next line from input file, returning number of characters read. */
- static int my_yyinput(char *buf, int max_size)
- {
- - int characters_read;
- -
- if (fgets(buf, max_size, yyin) == NULL)
- buf[0] = '\0';
- else
- @@ -540,7 +541,7 @@
- if (display_input)
- fputs(buf, out_fp);
-
- - return strlen(buf);
- + return (int) strlen(buf);
- }
-
- #endif /* #if READ_LINE */
-